Skip to content

fix(sop): keep streamed node positions when applying edits - #1162

Merged
Robert0622 merged 1 commit into
codex/fix-sop-orchestrator-role-settingsfrom
codex/fix-sop-streamed-node-positions
Nov 21, 2026
Merged

Robert0622 merged 1 commit into
codex/fix-sop-orchestrator-role-settingsfrom
codex/fix-sop-streamed-node-positions

Conversation

@Robert0622

Copy link
Copy Markdown
Collaborator

Follow-up to #1154. This PR targets its branch so the diff contains the canvas fix and its regression test.

Problem

#1154 fixes the shared-session HTTP 409 on the second orchestrator message. A later edit can still fail after the model returns a valid draft. During streaming, the canvas assigns positions to new nodes. If the final draft omits a position for an already drawn node, replacing that node loses its coordinates and the renderer throws Cannot read properties of undefined (reading 'x').

Changes

  • Retain the on-canvas position when the final draft leaves it unspecified.
  • Replace pending preview nodes and edges with the final draft before continuing the animation. The regression test covers both a node that was already drawn and changes that were still queued.

Verification

  • Reproduced the 409 on d58a85a and the canvas exception on the Fix role binding and settings in the SOP orchestrator #1154 merge preview e34ab530.
  • The new deterministic regression failed with the same exception on Fix role binding and settings in the SOP orchestrator #1154. Both orchestrator webtest suites and the targeted Go web tests passed with the fix.
  • Ran the browser scenario with Chromium and CodeBuddy iOA on DeepSeek V4.1 Flash. All three turns returned HTTP 200 in the same session. The original SOP kept its first two nodes, gained the newly created project role and a final manual approval, and saved as draft revision 2. The stored workflow had four nodes and three success edges.

@Robert0622

Copy link
Copy Markdown
Collaborator Author

在 c9580a8 上用 Chromium、隔离 MySQL 和 CodeBuddy iOA 实测通过。CLI 原生记录中的模型为 deepseek-v4.1-flash-ioa。

  1. 在空白 SOP 编排「内容预检 → 人工确认」。首轮草稿放上画布后,直接在同一个会话继续,第二轮成功返回角色草稿。
  2. 通过角色向导确认创建「发布检查员」,第三轮继续在原会话追加角色节点和「最终人工审核」。三轮的会话 ID 相同,均返回 HTTP 200。
  3. 点击保存并重新打开 SOP,核对到草稿修订 2。原两个节点 ID 保留,四个节点按三条成功连线串联。

新增回归用例在 #1154 上复现了画布异常,应用本 PR 后通过。编排相关 webtest 和 Go Web 定向测试也通过。

@Robert0622
Robert0622 merged commit c9580a8 into codex/fix-sop-orchestrator-role-settings Nov 21, 2026
15 checks passed
@Robert0622
Robert0622 deleted the codex/fix-sop-streamed-node-positions branch November 21, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant